﻿Imports DAO
Imports DTO
Imports System.Linq

Public Class HoSoHSBUS

    Public Sub addProfile_BUS(ByVal st As HoSoHSDTO)
        Dim pfDao As HoSoDAO = New HoSoDAO()
        pfDao.addProfile_DAO(st)
    End Sub

    Public Function findStudent_BUS(ByVal stname As String, ByVal address As String, ByVal email As String, ByVal borndate As Date, ByVal sex As Integer, ByVal mak As Integer, ByVal mal As String, ByVal year As Integer, ByVal matt As Integer) As DataTable
        Dim hsDao As HoSoDAO = New HoSoDAO()
        Return hsDao.findStudent_DAO(stname, address, email, borndate, sex, mak, mal, year, matt)
    End Function

    Public Sub updateProfileStudent_BUS(ByVal mahs As Integer, ByVal mak As Integer, ByVal mal As String, ByVal matt As Integer)
        Dim hsDao As HoSoDAO = New HoSoDAO()
        hsDao.UpdateProfileStudent_DAO(mahs, mak, mal, matt)
    End Sub

    Public Function getProfile_BUS() As DataTable
        Dim hsDao As HoSoDAO = New HoSoDAO()
        Return hsDao.getProfile_DAO()
    End Function

    Public Function findProfile_BUS(ByVal stname As String, ByVal address As String, ByVal email As String, ByVal borndate As Date, ByVal sex As Integer, ByVal mak As Integer, ByVal mal As String, ByVal matt As Integer) As DataTable
        Dim hsDao As HoSoDAO = New HoSoDAO()
        Return hsDao.findProfile_DAO(stname, address, email, borndate, sex, mak, mal, matt)
    End Function
End Class
